<template>
  <div>
    <BaseTable :tableObj="tableObj" />
  </div>
</template>
<script setup lang="ts">
import BaseTable from '@/components/table/BaseTable.vue'
import { ref } from 'vue'
import type { TableObj } from '@/components/table/types'

const tableObj = ref<TableObj>({
  tableHeader: [
    { label: '日期', value: 'date' },
    { label: '名字', value: 'name' },
    { label: '数量', value: 'num' },
    { label: '名字占比', value: 'nameRate' },
    { label: '数量占比', value: 'numRate' }
  ],
  tableData: [
    { id: 1, date: '2016-05-03', name: 'Weding', num: 5, nameRate: '20:00%', numRate: '30:00%' },
    { id: 4, date: '2016-05-02', name: 'Jen', num: 6, nameRate: '20:00%', numRate: '30:00%', children: [] },
    { id: 5, date: '2016-05-04', name: 'Tom', num: 5, nameRate: '20:00%', numRate: '30:00%', children: [] },
    { id: 6, date: '2016-05-01', name: 'Eshine', num: 1, nameRate: '20:00%', numRate: '30:00%' }
  ]
})

</script>
